-
Notifications
You must be signed in to change notification settings - Fork 1.3k
server,engine-schema: add check for account userdata cleanup #11595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Conversation
3c7e877 to
b54406e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11595 +/- ##
=========================================
Coverage 16.23% 16.24%
- Complexity 13378 13386 +8
=========================================
Files 5657 5657
Lines 498932 498967 +35
Branches 60552 60554 +2
=========================================
+ Hits 81016 81063 +47
+ Misses 408882 408869 -13
- Partials 9034 9035 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
engine/schema/src/main/java/com/cloud/user/dao/UserDataDaoImpl.java
Outdated
Show resolved
Hide resolved
7acde42 to
3a31c16
Compare
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14922 |
harikrishna-patnala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shwstppr I believe this fix will not effect the VMs that are already created using the template which previously linked to the userdata as we are saving the actual userdata in user_vm table. am I right ?
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@harikrishna-patnala I'm not sure if we save all user data in user_vm table.
|
Fixes apache#9477 Signed-off-by: Abhishek Kumar <[email protected]>
3a31c16 to
869ffad
Compare
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 15799 |
|
@harikrishna-patnala #9477 was still valid so I updated changes here to prevent account deletion when a userdata owned by the account is linked templates not owned by the account |
Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16287 |
| } | ||
|
|
||
| @Override | ||
| public List<Long> listByUserdataIdsNotAccount(List<Long> userdataIds, long accountId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public List<Long> listByUserdataIdsNotAccount(List<Long> userdataIds, long accountId) { | |
| public List<Long> listByUserdataIdsNotInAccount(List<Long> userdataIds, long accountId) { |
or listByUserdataIdsNotBelongToAccount
sureshanaparti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit, clgtm
Description
Fixes #9477
This PR add a check for userdata linked with templates not owned by the account during account cleanup
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?